﻿@model DawnAuthUserMDL
@{
    ViewBag.Title = "管理员信息编辑";
    ViewBag.MIndex = 2;
    ViewBag.CIndex = 1;
    ViewBag.BodyTitle = "管理员信息数据编辑";
    Layout = "~/Views/Shared/_LayoutEditor.cshtml";
    int FPageCurrent = TypeHelper.TypeToInt32(ViewBag.PageCurrent, 1);
}
@section Functions{
    <li><input class="button" type="button" value="保 存" onclick="dataSave();" /></li>
    <li><input class="button" type="button" value="返 回" onclick="GotoHref('/User/List/@FPageCurrent');" /></li>
}
@if (Model == null || Model.UserId <= 0)
{    
    @Html.Partial("_PartialJump")
}
else
{
    @Html.AntiForgeryToken()
    <input type="hidden" id="hidUserId" value="@Model.UserId" />
    <input type="hidden" id="hidPageCurrent" value="@FPageCurrent" />
    <div class="field-item">
        <label>隶属部门：</label>
        @Html.DropDownList("sltDepart", DepartHandler.GetSelectList(Model.DptId), new { @class="percent25" })
        <span class="color-red padding-top-3">*</span>
        <span id="icoDepart" class="margin-left-1em"></span>
    </div>
    <div class="field-memo">
        <label>&nbsp;</label>
        <span id="infoDepart" class="color-blue"></span>
    </div>
    <div class="field-item">
        <label>管理级别：</label>
        @Html.DropDownList("ddlGrade", UserHandler.GetSelectList(Model.UserGrade), new { @class="percent25" })
        <span class="color-red padding-top-3">*</span>
        <span id="icoGrade" class="margin-left-1em"></span>
    </div>
    <div class="field-memo">
        <label>&nbsp;</label>
        <span id="infoGrade" class="color-blue"></span>
    </div>
    <div class="field-item">
        <label>管理员姓名：</label>
        @Html.TextBox("txtSurname", Model.UserSurname, new { @class = "input-text percent25", maxlength = "10" })
        <span class="color-red padding-top-3">*</span>
        <span id="icoSurname" class="margin-left-1em"></span>    
    </div>
    <div class="field-memo">
        <label>&nbsp;</label>
        <span id="infoSurname" class="color-blue"></span>
    </div>
    <div class="field-item">
        <label>账号名称：</label>
        @Html.TextBox("txtName", Model.UserName, new { @class = "input-text percent25", maxlength = "16", disabled = "disabled" })
        <span id="icoName" class="margin-left-1em"></span>
    </div>    
    <div class="field-item">
        <label>手机号码：</label>
        @Html.TextBox("txtMobile", Model.UserMobile, new { @class = "input-text percent25", maxlength = "15" })
        <span id="icoMobile" class="margin-left-1em"></span>
    </div>
    <div class="field-memo">
        <label>&nbsp;</label>
        <span id="infoMobile" class="color-blue"></span>
    </div>
    <div class="field-item">
        <label>电子邮箱：</label>
        @Html.TextBox("txtEmail", Model.UserEmail, new { @class = "input-text percent25", maxlength = "50" })
        <span id="icoEmail" class="margin-left-1em"></span>
    </div>
    <div class="field-memo">
        <label>&nbsp;</label>
        <span id="infoEmail" class="color-blue"></span>
    </div>
    <div class="field-item">
        <label>管理员描述：</label>
        @Html.TextArea("txtDesc", Model.UserDesc, new { @class = "input-text percent50", maxlength = "300" })
        <span id="icoDesc" class="margin-left-1em"></span>
    </div>
    <div class="field-memo">
        <label>&nbsp;</label>
        <span id="infoDesc" class="color-blue"></span>
    </div>
    <div class="field-item">&nbsp;</div>
}    
@section Scripts{
    <script src="@Scripts.Url("~/Scripts/user/editor.js")" type="text/javascript"></script>
}